package rank1400;

/**
 * 1217. 玩筹码
 */
public class No1217 {
    public int minCostToMoveChips(int[] position) {
        int zero = 0, one = 0;
        for (int i : position) {
            if (i % 2 == 0) zero++;
            else one++;
        }
        return Math.min(zero, one);
    }
}
